package com.api.shopapi.mapper;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MedicationRecordMapper {
//
//    @Insert("insert into medication_record " +
//            "(" +
//            "MedicationRecordCode," +
//            "ElderlyCode," +
//            "NurseAideCode," +
//            "MedicationNames," +
//            "Remarks," +
//            "CreateTime," +
//            "CarePlaceCode" +
//            ") values " +
//            "(" +
//            "#{medicationRecord.MedicationRecordCode}," +
//            "#{medicationRecord.ElderlyCode}," +
//            "#{medicationRecord.NurseAideCode}," +
//            "#{medicationRecord.MedicationNames}," +
//            "#{medicationRecord.Remarks}," +
//            "#{medicationRecord.CreateTime}," +
//            "#{medicationRecord.CarePlaceCode}" +
//            ")")
//    int insert(@Param("medicationRecord") MedicationRecord medicationRecord);
//
//
//
//    @Delete("delete from medication_record where medicationRecordCode=#{medicationRecordCode}")
//    int delete(@Param("medicationRecordCode") String medicationRecordCode);
//
//
//    @Update("update medication_record" +
//            " set" +
//            " Remarks=#{medicationRecord.Remarks}" +
//            " where" +
//            " MedicationRecordCode=#{medicationRecord.MedicationRecordCode}")
//    int update(@Param("medicationRecord") MedicationRecord medicationRecord);
//
//
//    @Select("select * from medication_record where medicationRecordCode=#{medicationRecordCode} limit 1")
//    MedicationRecord getByMedicationRecordCode(@Param("medicationRecordCode") String medicationRecordCode);
//
//    @Select("select * from medication_record where elderlyCode=#{elderlyCode} order by Time desc")
//    List<MedicationRecord> listByElderlyCode(@Param("elderlyCode") String elderlyCode);
//
//    @Select("<script>" +
//            " select * from medication_record" +
//            " where carePlaceCode=#{carePlaceCode} " +
//            " and createTime between #{startTime} and #{endTime} " +
//            " order by createTime desc" +
//            "</script>")
//    List<MedicationRecord> listByCarePlaceCode(@Param("carePlaceCode") String carePlaceCode,
//                                           @Param("startTime") String startTime,
//                                           @Param("endTime") String endTime);


}
